package org.yxt.springcloud.service;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.yxt.springcloud.entity.CommonResult;

/**
 * 微服务接口
 */
@FeignClient(value = "cloud-alibaba-seate-storage-service")
public interface StorageService {

    /**
     * 扣减库存
     *
     * @param productId
     * @param count
     * @return
     */
    @PostMapping(value = "/storage/decrease")
    CommonResult decrease(@RequestParam("productId") int productId, @RequestParam("count") int count);
}
